s = 'hello,Python'
# 默认从0开始
s1 = s[:5]
print(s1)

# 默认到最后
s2 = s[6:]
print(s2)

newstr = s1 + ',' + s2
print(newstr)

print('-------------------------')
print(id(s))
print(id(newstr))

print('---------切片[start:end:step]----------------')

print(s[1:5:1])
print(s[::2])
print(s[-6::1])
